package com.sw.servlet;

/**
 * @author sw
 * @project minicat
 * @description
 * @date 2020/4/29 22:47
 */
public abstract class HttpServlet implements Servlet {

    public abstract void doGet(Request request,Response response);
    public abstract void doPost(Request request,Response response);

    @Override
    public void service(Request request, Response response) {
        if(request.getMethod().equalsIgnoreCase("get")){
            doGet(request,response);
        }else{
            doPost(request,response);
        }
    }
}
